<template>
    <div class="recommend">
        <div class="recommend-item" v-for="(item,index) in recommends.slice(0,4)" :key="index">
            <a href="/detail" >
                <img :src=item.url alt="">
                <div>{{item.title}}</div>
            </a>
        </div>
    </div>
</template>

<script>

export default {
    name: 'Recommend',
    props: {
        recommends: {
            type: Array,
            default(){
                return[]
            }
        }
    }
}
</script>

<style lang="scss" scoped>
.recommend{
    display: flex;
    width: 100%;
    text-align: center;
    padding: 15px 0 30px;
    border-bottom: 8px solid #eee;
    font-size: 12px;
}
.recommend-item{
    flex: 1;
    img{
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }
}
</style>